<template>
  <div class="box-item">
    <div class="textMax-box">
      <div class="textMax-box-child">
        <textMax :data="props.info.remarks" :maxLen="56" />
      </div>
    </div>
    <div class="title-right-p">
      <titles :title="props.info.text" />
    </div>

    <t-row style="margin-left: 20%" :gutter="20">
      <t-col :span="4" v-for="(item, index) in props.info.children" :key="index">
        <div class="item-box">
          <div class="item-heard">
            <img
              @click="pathChild(item)"
              :src="urls + item.value + '?imageView2/1/w/300/h/300/format/webp'"
              alt=""
              v-if="item.value"
            />

            <img
              @click="pathChild(item)"
              src="http://101.34.143.36:8890/api/image/387939155165253/h_300,w_300"
              alt=""
              v-else
            />
            <span
              class="item-title"
              :style="{
                fontSize: store.styleInfo.mintitleSize,
                fontFamily: store.styleInfo.textFamily,
                color: store.styleInfo.fontColor,
                fontWeight: 'bold',
              }"
              >{{ item.text }}</span
            >
            <span
              class="item-text"
              :style="{
                fontSize: store.styleInfo.contentSize,
                fontFamily: store.styleInfo.textFamily,
                color: store.styleInfo.fontColor,
              }"
              >{{ item.remarks }}</span
            >
          </div>
        </div>
      </t-col>
    </t-row>
  </div>
</template>

<script setup lang="ts">
import { pathList, pathListLoop } from '../route';
import { urls } from '@/utils/request/upload';
import titles from '@/components/title/title.vue';
import buttonIcon from '@/components/title/buttonIcon.vue';
import textMax from '@/components/textMax/textMax.vue';
import { handlemouse } from '@/utils/minxin';
import { onMounted } from 'vue';
import { useProjectStore } from '@/store';
import { useRouter, useRoute } from 'vue-router';
import UnitImageNull from '@/components/unitImageNull/unitImageNull.vue';
const router = useRouter();
const route = useRoute();
const store = useProjectStore();
const props = defineProps({
  info: {
    type: Object,
  },
});
onMounted(() => {
  // handlemouse('scroll-box2');
});
const pathChild = (e: any) => {
  store.setchildModel(e);
  router.push({
    name: route.meta.loopType ? pathListLoop[8] : pathList[8],
    query: {},
  });
};
</script>

<style lang="less" scoped>
@import './index.less';
.box-item {
  width: 100%;
  min-height: 730px;
}
.textMax-box {
  width: 38%;
  height: 100%;
  padding: 50px 130px;
  padding-left: 170px;
  position: absolute;
  top: 80px;
  left: 0;
  display: flex;
  // background: #cfbda8;
}
.textMax-box-child {
  position: relative;
  z-index: 999;
}
.title-right-p {
  position: absolute;
  top: 80px;
  right: 130px;
}
.item-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  width: 100%;
  min-height: 576px;
  img {
    width: 100%;
    height: auto;
  }
}
.item-box-br {
  border-left: 1px solid #e6e6e6;
  border-right: 1px solid #e6e6e6;
}
.item-text {
  font-weight: 500;
  margin-top: 32px;
}
.item-title {
  margin: 32px 0;
}
.item-title1 {
  margin-bottom: 32px;
}
.item-heard {
  display: flex;
  flex-direction: column;
  img {
    width: 100%;
    height: 300px;
  }
}
</style>
